from base.base import Base
from selenium.webdriver.common.by import By
from time import sleep


class StudyPage(Base):
    # 点击 学习
    xuexi=(By.ID,'cn.xuexi.android:id/home_bottom_tab_icon_group')
    # 点击搜索框
    souusokuang='new UiSelector().resourceId("cn.xuexi.android:id/text")'
    # 点击输入框
    shurukuang=(By.XPATH,'android.widget.EditText[@text="强国同学汇"]')
    # 断言1  定位
    dy1=(By.XPATH,'//android.view.View')
    # 断言2  无
    dy2=(By.XPATH,'android.widget.TextView')
    # 断言3  定位输入框
    dy3=(By.ID,'cn.xuexi.android:id/text')

    def Studyyewu(self,cons):
        self.loc_ele(self.xuexi).click()
        sleep(3)
        self.loc_ui_ele(self.souusokuang).click()
        sleep(3)
        self.loc_wait_ele(self.shurukuang).send_keys(cons)
        sleep(3)